{if !$uploaded}

<form method="post" enctype="multipart/form-data">
	<input type="hidden" name="MAX_FILE_SIZE" value="99999999" />
	<input type="file" name="attachment" onchange="this.form.submit()" />
</form>

{else}

{if $type eq 'image'}
{capture assign=html}<div class='attached'><br /><br /><img src='{$urlStatic}/{image src=$src w=500}' alt='attachment' /><input type='hidden' class='attachment_image' name='attachment_image[]' value='{$urlStatic}/{image src=$src w=500}' /><br /><a href='#' onclick='$(this).parents(\".attached\").detach(); return false;'>{'remove'|t}</a></div><div id='attachment'><iframe src='{url label=wallUpload}' scrolling='no' height='40' width='400' frameborder='0'></iframe></div>{/capture}
<script type="text/javascript">
window.parent.showAttachment("{$html}");
</script>
{/if}

{/if}